-- GENERATED SPELL FOR [Deadwind Ogre Mage] --


function spell0_7379(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(6742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7379', 30339, 1)
end

function spell1_7379(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(15039,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7379', 12000, 1)
end

function spell2_7379(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(20824,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7379', 3000, 1)
end

function spell3_7379(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7379', 0, 1)
end

function Sorts_7379(pUnit, Event)
local choix_sorts_7379 = math.random(0, 3)
if choix_sorts_7379 == 0 then
pUnit:RegisterEvent('spell0_7379', 1, 1)
end
if choix_sorts_7379 == 1 then
pUnit:RegisterEvent('spell1_7379', 1, 1)
end
if choix_sorts_7379 == 2 then
pUnit:RegisterEvent('spell2_7379', 1, 1)
end
if choix_sorts_7379 == 3 then
pUnit:RegisterEvent('spell3_7379', 1, 1)
end
end

function mob7379_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7379', math.random(1500, 3000), 1)
end

function mob7379_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7379_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7379_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7379, 1, 'mob7379_Action')
RegisterUnitEvent(7379, 2, 'mob7379_Leave')
RegisterUnitEvent(7379, 3, 'mob7379_Kill')
RegisterUnitEvent(7379, 4, 'mob7379_Die')
